-- @owner: z@wan005
-- @date: 2023/6/1
-- @testpoint: name_const函数作为对象名使用
--step1:查询name_const是否为关键字;expect:不是关键字
select * from pg_get_keywords() where word ='name_const';

--step2:创建函数;expect:成功
drop function if exists name_const(s char(20));
create function name_const(s char(20)) returns int contains sql as $$ select 1 $$;/
--step3:调用函数;expect:成功
select name_const(1,1);
select name_const(1,null);

--step4:删除函数;expect:成功
drop function if exists name_const(s char(20));

--step5:name_const作为数据库名;expect:成功
drop database if exists name_const;
create database name_const;
drop database if exists name_const;


--step6:name_const作为用户名;expect:成功
drop user if exists name_const;
create user name_const with sysadmin password 'Test_123';
drop user if exists name_const;
